Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Creating and Accessing UNIX Path Name Storage Objects

QuickDraw 3D provides routines for creating and managing UNIX storage objects specified using a path name.

You need to link your application with the standard I/O library to use these functions.

Q3UnixPathStorage_New

You can use the Q3UnixPathStorage_New function to create a new UNIX storage object specified using a path name.

TQ3StorageObject Q3UnixPathStorage_New (const char *pathName);
pathName
A path name of a file. The path name is a null-terminated C string.

DESCRIPTION

The Q3UnixPathStorage_New function returns, as its function result, a new storage object associated with the file specified by the pathName parameter. The specified file is assumed to be closed. QuickDraw 3D opens the file (by calling fopen ) and, when the associated storage object is closed or disposed of, QuickDraw 3D closes the file (by calling fclose ). If Q3UnixPathStorage_New cannot create a new storage object, it returns the value NULL .

ERRORS

kQ3ErrorOutOfMemory kQ3ErrorNULLParameter

Q3UnixPathStorage_Get

You can use the Q3UnixPathStorage_Get function to get information about a UNIX path name storage object.

TQ3Status Q3UnixPathStorage_Get (
                     TQ3StorageObject storage,
                     char *pathName);
storage
A UNIX path name storage object.
pathName
On entry, a pointer to a block of memory large enough to hold a string of size kQ3StringMaximumLength . The path name of the file associated with the specified storage object is copied into that block of memory. The path name is a null-terminated C string.

DESCRIPTION

The Q3UnixPathStorage_Get function returns, through the pathName parameter, a copy of the path name of the file associated with the UNIX path storage object specified by the storage parameter.

ERRORS

kQ3ErrorInvalidObjectParameter kQ3ErrorNULLParameter

Q3UnixPathStorage_Set

You can use the Q3UnixPathStorage_Set function to set information about a UNIX path name storage object.

TQ3Status Q3UnixPathStorage_Set (
                     TQ3StorageObject storage,
                     const char *pathName);
storage
A UNIX path name storage object.
pathName
A pointer to the path name of a file. The path name is a null-terminated C string. (A file does not yet need to exist in that location.)

DESCRIPTION

The Q3UnixPathStorage_Set function sets the path name of the file associated with the UNIX path name storage object specified by the storage parameter to the string pointed to by the pathName parameter.

SPECIAL CONSIDERATIONS

You must not use Q3UnixPathStorage_Set with an open UNIX path name storage object.

ERRORS

kQ3ErrorAccessRestricted kQ3ErrorInvalidObjectParameter


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |